package com.bookocean.infrastructure.persistence.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 小说章节PO类
 * 
 * @author BookOcean
 * @since 2024-01-01
 */
@Data
@TableName("novel_chapter_po")
public class NovelChapterPO {

    /**
     * 章节ID
     */
    @TableId(value = "chapter_id", type = IdType.AUTO)
    private Long chapterId;

    /**
     * 小说ID
     */
    @TableField("novel_id")
    private Long novelId;

    /**
     * 章节序号
     */
    @TableField("chapter_number")
    private Integer chapterNumber;

    /**
     * 章节标题
     */
    @TableField("title")
    private String title;

    /**
     * 章节内容
     */
    @TableField("content")
    private String content;

    /**
     * 作者ID
     */
    @TableField("author_id")
    private Long authorId;

    /**
     * 状态（1：草稿，2：已发布）
     */
    @TableField("status")
    private Integer status;

    /**
     * 字数统计
     */
    @TableField("word_count")
    private Integer wordCount;

    /**
     * 阅读数
     */
    @TableField("view_count")
    private Integer viewCount;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    /**
     * 发布时间
     */
    @TableField("published_at")
    private LocalDateTime publishedAt;
}
